/*--------------------------------------------------|
| hiddenLeft 1.00 |  lovefuwp                         |
| Updated: 2009-12-24                                |
|--------------------------------------------------*/
var hiddenFlag=false;
var screenFlag=false;
var voices=false;//声音报警控制
var alarm=false;//报警显示控制
var controlPad=false;//控制面板控制
var alarmInfo=true;//报警信息控制
function hiddenLeft() {
	var hiddenImg = document.createElement("img");	
	hiddenImg.setAttribute("id","hiddenImg");
	hiddenImg.style.position = "absolute";
	hiddenImg_Y=(parseInt(parent.document.body.offsetHeight))/2+35;
	hiddenImg.style.top=hiddenImg_Y+"px";
	hiddenImg.style.left="175px";
	hiddenImg.style.zIndex = "97";
	hiddenImg.style.cursor="pointer";
	hiddenImg.title="隐藏左边导航";
	hiddenImg.src="/SCMDB/images/toLeft.gif";
	document.body.appendChild(hiddenImg);
	hiddenImg.onclick=function(){
		var defaultCss=document.getElementById("framework");
		if(hiddenFlag==false){
			defaultCss.href="/SCMDB/style/hiddenframe.css";
			hiddenImg.style.left="-1px";
			hiddenImg.src="/SCMDB/images/toRight.gif";
			hiddenImg.title="显示左边导航";
			hiddenFlag=true;
		}else{
			defaultCss.href="/SCMDB/style/framework.css";
			hiddenImg.style.left="175px";
			hiddenImg.src="/SCMDB/images/toLeft.gif";
			hiddenImg.title="隐藏左边导航";
			hiddenFlag=false;
		}
		
	}
	
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
addLoadEvent(hiddenLeft);